import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login/Login'
import CheckShopStatus from '@/components/CheckShopStatus'
import updateShopData from '@/components/UpdateShopData'
import Index from '@/components/Index'
import OrderWaiting from '@/components/Order/OrderWaiting'
import OrderPending from '@/components/Order/OrderPending'
import OrderComplete from '@/components/Order/OrderComplete'
import OrderCancel from '@/components/Order/OrderCancel'

import GoodsSelling from '@/components/Goods/GoodsSelling'
import AlterGoods from '@/components/Goods/GoodsAlter'
import GoodsRemain from '@/components/Goods/GoodsRemain'

import SellDetail from '@/components/SellDetail'

import PutForward from '@/components/Account/PutForward'
import BalanceRecord from '@/components/Account/BalanceRecord'
import ShopInfoAlter from '@/components/Account/ShopInfoAlter'
import ShoperInfoAlter from '@/components/Account/ShoperInfoAlter'

import Preview from '@/components/Preview'

import SystemNotice from '@/components/SystemNotice'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path: '/index',
      component: Index,
      children: [
        {
          path: 'orderWaiting',
          name: 'OrderWaiting',
          component: OrderWaiting
        },
        {
          path: 'orderPending',
          name: 'OrderPending',
          component: OrderPending
        },
        {
          path: 'orderComplete',
          name: 'OrderComplete',
          component: OrderComplete
        },
        {
          path: 'orderCancel',
          name: 'OrderCancel',
          component: OrderCancel
        },
        {
          path: 'goodsSelling',
          name: 'GoodsSelling',
          component: GoodsSelling
        },
        {
          path: 'alterGoods',
          name: 'AlterGoods',
          component: AlterGoods
        },
        {
          path: 'goodsAdd',
          name: 'AddrGoods',
          component: AlterGoods
        },
        {
          path: 'goodsRemain',
          name: 'GoodsRemain',
          component: GoodsRemain
        },
        {
          path: 'sellDetail',
          name: 'SellDetail',
          component: SellDetail
        },
        {
          path: 'putForward',
          name: 'PutForward',
          component: PutForward
        },
        {
          path: 'balanceRecord',
          name: 'BalanceRecord',
          component: BalanceRecord
        },
        {
          path: 'shopInfoAlter',
          name: 'ShopInfoAlter',
          component: ShopInfoAlter
        },
        {
          path: 'shoperInfoAlter',
          name: 'ShoperInfoAlter',
          component: ShoperInfoAlter
        },
        {
          path: 'systemNotice',
          name: 'SystemNotice',
          component: SystemNotice
        },
        {
          path: '/',
          name: 'Preview',
          component: Preview
        }
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/checkShopStatus',
      name: 'CheckShopStatus',
      component: CheckShopStatus
    },
    {
      path: '/updateShopData',
      name: 'updateShopData',
      component: updateShopData
    }
  ]
})
